/*
 * @Author: upp24 1246815351@qq.com
 * @Date: 2023-05-26 09:06:52
 * @LastEditors: upp24 1246815351@qq.com
 * @LastEditTime: 2023-05-26 16:48:01
 * @FilePath: /pure-admin-thin-i18n/src/api/banner.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
export type BannerResult = {
  page: number;
  pagesize: number;
  success: boolean;
  code: number;
  token: string;
  msg: string;
  data: {
    data: any[];
    total: number;
    page: number;
    pagesize: number;
  };
};
/** banner列表*/
export const bannerList = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("banner/list"), {
    data
  });
};
/** banner修改*/
export const bannerUpdate = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("banner/update"), {
    data
  });
};
/** banner上传*/
export const bannerUpload = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("/upload"), {
    data
  });
};
/** banner删除*/
export const bannerDelete = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("banner/delete"), {
    data
  });
};
